package com.taotao.common.pojo;

/**
 * @Description:上传图片的返回结果
 * @Author:fu.cc
 * @Company:neusoft
 * @CreateDate:2016年11月10日上午9:16:53
 */
public class PictureResult {
	private int error;
	private String url;
	private String message;

	public PictureResult(int error, String url, String message) {
		this.error = error;
		this.url = url;
		this.message = message;
	}

	// 成功时调用的方法
	private static PictureResult ok(String url) {
		return new PictureResult(0, url, null);
	}

	// 失败时调用的方法
	private static PictureResult error(String message) {
		return new PictureResult(1, null, message);
	}

	public int getError() {
		return error;
	}

	public void setError(int error) {
		this.error = error;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
